package com.action.mvc.sm.controller;

import com.action.mvc.sm.rabbit.MessageExecuteProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wuxiang on 2019/5/14.
 */
@RestController
@RequestMapping("/msg")
public class MessageController {

    @Autowired
    MessageExecuteProducer producer;

    /**
     * 测试 RabbitMQ 收发消息
     */
    @RequestMapping("/send")
    public void send() {
        System.out.println("发送消息");
        producer.sendMessageExecuteMessage("test");
    }

}
